package com.tedu.pojo;

/**
 *
 * 用户的实体类
 * 一个用户  对应数据库中用户表
 */
public class User {
    private  int id ;
    private String name;
    private String password;

    //需要提供对外方法   get  set方法

    // 自动生成无参的构造方法
    public User() {
    }

    public User(int id, String name, String password) {
        this.id = id;
        this.name = name;
        this.password = password;
    }

    // alt+ insert  快捷键
    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", password='" + password + '\'' +
                '}';
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }
}
